package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {

    /**
     * 根据id查询多个id
     * @param dishIds
     * @return
     */
    List<Long> getSetmealById(List<Long> dishIds);

    /**
     * 为setmeal——dishes表添加数据
     * @param setmealDishes
     */
    void setmealDishInsert(List<SetmealDish> setmealDishes);

    /**
     * 删除setmeal_dish表中数据
     * @param id
     */
    @Delete("delete from setmeal_dish where setmeal_id = #{id}")
    void setmealDishDelete(Long id);

    void setmeaDelete(List<Long> ids);

    @Select("select dish_id from setmeal_dish where setmeal_id = #{id}")
    List<Long> setmealDishId(Long id);
}
